package com.aegis.api.auth.config;

import com.aegis.api.auth.manage.FeignInterceptor;
import feign.Feign;
import feign.RequestInterceptor;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

//@EnableFeignClients({"com.aegis.api.auth.service"})
@Configurable
public class FeignConfiguration {

//    @Bean
//    public RequestInterceptor requestInterceptor() {
//        return new FeignInterceptor();
//    }

//    @Bean
//    public WxAuthApi wxAuthApi() {
//        String dynamicUrl = "http://localhost:8080";  // 你可以动态获取 URL
//        return Feign.builder()
//                .target(WxAuthApi.class, dynamicUrl);  // 直接指定 URL
//    }

//    @Bean
//    public RequestInterceptor dynamicRequestInterceptor() {
//        return template -> {
//            // 这里不处理 URL，留到动态 Feign 处理
//        };
//    }

}